<template>
  <el-container>
    <el-header style="padding: 0px; height: 60px">
      <el-menu
        :default-active="this.$route.path"
        class="el-menu-demo, clearfix"
        mode="horizontal"
        router
        background-color="#545c64"
        text-color="#fff"
        active-text-color="#ffd04b">
        <el-col :span="3">
          <div class="sidebar-header">
            <img class="header-logo" src="@/assets/logo.png" />
          </div>
        </el-col>
        <el-menu-item v-for="(item, i) in navigateTheList" :key="i" :index="item.path">
          <template slot="title">
            <span>{{ item.name }}</span>
          </template>
        </el-menu-item>
      </el-menu>
    </el-header>
    <el-main style="padding: 1px 0px 0px 0px">
      <router-view></router-view>
    </el-main>
  </el-container>
</template>
<script>
export default {
  name: 'Layout',
  data() {
    return {
      navigateTheList: [
        {path: "/home", name: "收银台"},
        {path: "/main", name: "工作台"},
        {path: "/orderstatistic", name: "统计"}
      ],
    };
  },
  methods: {}
}
</script>
<style>
.sidebar-header {
  background-color: #545c64;
  color: #fff;
}

.header-logo {
  margin: 10px 10px 2px 5px;
  height: 42px;
}
</style>
